﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace VideoMergeSplitApp.ui.dialog
{
    public partial class InputDialog : Form
    {
        public string InputText { get; private set; }
        public InputDialog(string title)
        {

            InitializeComponent();
            this.Text = title;
        }
        public InputDialog()
        {

            InitializeComponent();
        }
   

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Equals(""))
            {
                return;
            }

            InputText = textBox1.Text;
            DialogResult = DialogResult.OK;
            Close();
        }

        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == ' ')
            {
                e.Handled = true;
            }
        }

        private void InputDialog_Load(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }
    }
}
